<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:PropertyTools.Wpf">
    <Style TargetType="{x:Type local:PropertyEditor}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:PropertyEditor}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid Name="PART_Grid">
                            <Grid.Resources>
                                <ResourceDictionary>
                                    <ResourceDictionary.MergedDictionaries>
                                        <ResourceDictionary Source="/PropertyTools.Wpf;component/PropertyEditor/Templates/PropertyEditorTemplates.xaml"/>
                                        <ResourceDictionary Source="/PropertyTools.Wpf;component/PropertyEditor/Templates/BasicEditors.xaml"/>
                                        <ResourceDictionary Source="/PropertyTools.Wpf;component/PropertyEditor/Templates/ExtendedEditors.xaml"/>
                                    </ResourceDictionary.MergedDictionaries>
                                </ResourceDictionary>
                            </Grid.Resources>
                            <TabControl 
                                Name="PART_Tabs" 
                                Focusable="False"
                                ContentTemplate="{StaticResource TabPageTemplate}" 
                                ItemTemplate="{StaticResource TabHeaderTemplate}"/>
                            <ContentControl 
                                Name="PART_Page" 
                                ContentTemplate="{StaticResource TabPageTemplate}"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ErrorTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Rectangle Width="12" Height="12" RadiusX="2" RadiusY="2" Fill="Red" ToolTip="{Binding}"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="WarningTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Rectangle Width="12" Height="12" RadiusX="2" RadiusY="2" Fill="Orange" ToolTip="{Binding}"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
